import $ from 'jquery'
import {createUnit} from './unit'
import {createElement} from './element'
import {Component} from './component'
let React = {
  render,
  rootIndex: 0,
  createElement,
  Component
}

function render(element, container) {
  let unit = createUnit(element)
  let markUp = unit.getMarkUp(React.rootIndex); // 用来返回HTML标记
  $(container).html(markUp);
  $(document).trigger('mounted');
}

export default React

// React 
// 有render  方法
// rootIndex 属性
